class RichTextComponent extends HTMLElement {
  constructor() {
    super()
    this.attachShadow({ mode: 'open' })
  }

  connectedCallback() {
    this.render()
  }

  render() {
    const shadowRoot = this.shadowRoot
    const content = this.getAttribute('content')
    const div = document.createElement('div')
    div.innerHTML = content || ''
    shadowRoot.appendChild(div)
  }
}
